package com.flynn.rock.crm.entity.customer;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;

@Getter
@Setter
@Entity
@Table(name = "crm_customer_operate_record")
@EntityListeners(AuditingEntityListener.class)
public class CustomerOperateRecordEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "customer_operate_record_id", nullable = false)
    private Long id;

    @Column(name = "customer_id")
    private Long customerId;

    @Column(name = "operate_title", length = 64)
    private String operateTitle;

    @Column(name = "operate_user_id")
    private Long operateUserId;

    @Column(name = "operate_user_name")
    private String operateUserName;

    @Column(name = "operate_type", length = 64)
    private String operateType;

    @Column(name = "operate_content", length = 1024)
    private String operateContent;

    @CreatedDate
    @Column(name = "create_time")
    private LocalDateTime createTime;

    @LastModifiedDate
    @Column(name = "update_time")
    private LocalDateTime updateTime;
}